﻿// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");

// 基础咖啡
Beverage coffee = new Espresso();

// 加牛奶
// 推测 Milk 应继承自与 Espresso 相同的抽象基类或接口，确保类型兼容
coffee = new Milk(coffee);

// 再加糖
coffee = new Sugar(coffee);

Console.WriteLine($"{coffee.Description} costs ${coffee.Cost():F2}");